<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
    var oper = {
        save:function(id){
        debugger
            if(!validForm()) {
                return false;
            }
            var url = 'system/agentProsDiscount/save/'+id;
            form1.action = url;
            form1.submit();
            return true;
        }
    };

</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
	  role="form" >
	<input type="hidden" name="model.ids" value="${model.ids}" />

	<div style="height:460px; overflow:scroll; overflow-x: hidden ">
	<!-- 数据列表 -->
	<table class="table table-striped table-bordered table-hover">
		<thead>
		<tr>
			<th>序号</th>
			<%  // 列表头部 %>
			<th name="ids" style = "width:5%"> </th>
			<th name="vasProdName" style = "width:45%" >平台产品名称</th>
			<th name="productPrice" >价格</th>
			<th name="discount">设置折扣</th>
		</tr>
		</thead>
		<tbody>
		<% for(item in page){ %>
		<tr>
			<td>${itemLP.index }</td>
			<td>
				<input type="checkbox" id="productvasids_${item.ids}" name="checkedids" value="${item.ids}" />
			</td>
			<%  // 列表内容 %>
			<td>${item.vasProdName}</td>
			<td>${item.productPrice}</td>
			<td>
				<input type="text" name="productvasids_${item.ids}" value="1" style="width:100px;" class="form-control" />
			</td>
		</tr>
		<% } %>
		</tbody>
	</table>
	</div>
	
	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
		<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		
			<button class="btn btn-primary" onclick="oper.save('${model.ids}');return false;">保 存</button>
			
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
		</div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>